<?php
/**
 * User: WL
 * Time: 12-10-13 - 上午9:14
 * File: list.inc.php
 * Project For ixdcw.com
 */
/**
 * 2013-4-1 Sameal add order by cityid an group level
 */
defined('IN_IXDCW') or exit('Access Denied');
require DT_CORE.'/'.$module.'/common.inc.php';
require DT_CORE.'/buyhelp/common.inc.php';
$navname ='loan';
$order= 'edittime desc';

//图片轮换
$loanList= $db->getAll("select title,itemid,thumb,linkurl from {$db->getPre()}information where status=3 and catid=5153 and thumb!='' order by {$order} limit 6");
$loanList_left = array_splice($loanList,0,6);
//车贷活动
$guideList = $db->getAll("select title,itemid,edittime from {$db->getPre()}information where status=3 and catid=5153  order by {$order} limit 17");


//带图片的商用车车贷信息
$tags1 = $db->getAll("select title,thumb,itemid,linkurl from {$db->getPre()}loan where status=3  and catid=5150 and thumb!='' order by {$order} limit 6");
//带图片的商用车车贷信息的条数
$condition = 'status=3';
$condition .= " and thumb!=''and catid=5150";
$table  = Table::name(Table::NAME_LOAN);
$items1    = $db->count($table, $condition);
//带图片的乘用车车贷信息
$tags2 = $db->getAll("select title,thumb,itemid,linkurl from {$db->getPre()}loan where status=3 and catid=5149 and thumb!='' order by {$order} limit 8");
//带图片的乘用车车贷信息的条数
$condition = 'status=3';
$condition .= " and thumb!=''and catid=5149";
$table  = Table::name(Table::NAME_LOAN);
$items2    = $db->count($table, $condition);
//带图片的房车车贷信息
$tags3 = $db->getAll("select title,thumb,itemid,linkurl from {$db->getPre()}loan where status=3 and catid=5151 and thumb!='' order by {$order} limit 8");
//带图片的房车车贷信息的条数
$condition = 'status=3';
$condition .= " and thumb!=''and catid=5151";
$table  = Table::name(Table::NAME_LOAN);
$items3   = $db->count($table, $condition);

//带图片的新能源车车贷信息

$tags4 = $db->getAll("select title,thumb,itemid,linkurl from {$db->getPre()}loan where status=3 and catid=5152 and thumb!='' order by {$order} limit 8");
//带图片的新能源车车贷信息的条数
$condition = 'status=3';
$condition .= " and thumb!=''and catid=5152";
$table  = Table::name(Table::NAME_LOAN);
$items4    = $db->count($table, $condition);

$seo_file = 'list';
include DT_INC.'/seo.inc.php';
include template('index', $module);